export function formatTime(time) {
  time = time || new Date()
  if (time instanceof Date) {
    time = time.toLocaleDateString()
  }
  let arr = []
  time.replace(/\d+/g, val => {
    arr.push(val.length < 2 ? '0' + val : val)
  })
  return arr.join('')
}

export function formatDateStr(dateStr) {
  return dateStr.substring(4, 6) + ' 月 ' + dateStr.substring(6) + ' 日'
}
